def all_param_size(model):
    parameter_sizes = [p.numel() for p in model.parameters()]
    print(parameter_sizes)
    print("统计参数总数量 {}".format(sum(parameter_sizes)))


def all_param_name_and_size(model):
    parameter_names = [name for name, _ in model.named_parameters()]
    parameter_sizes = [p.numel() for p in model.parameters()]
    for l in range(len(parameter_names)):
        print(parameter_names[l],parameter_sizes[l])

def print_model(model):
    print(model)